package com.cqvie.model;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

@Entity
public class Student {
	private int studentID; // 学号
	private String name; // 姓名
	private String stu_password;// 密码
	private byte mark; //标记：是否是教师指定
	private Classes classes;// 班级

	@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
	@JoinColumn(name = "stu_Class")
	public Classes getClasses() {
		return classes;
	}

	public String getName() {
		return name;
	}

	public String getStu_password() {
		return stu_password;
	}

	@Id
	public int getStudentID() {
		return studentID;
	}

	public void setClasses(Classes classes) {
		this.classes = classes;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setStu_password(String stu_password) {
		this.stu_password = stu_password;
	}

	public void setStudentID(int studentID) {
		this.studentID = studentID;
	}

	public byte getMark() {
		return mark;
	}

	public void setMark(byte mark) {
		this.mark = mark;
	}

}
